home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994…tember: Reference Library / Dev.CD Sep 94.toast / Technical Documentation / PCI Information / PCI Developer’s Kit (disk) / Native Drivers / OpenNuDriver.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-27  |  802 b   |  44 lines  |  [TEXT/MPCC]

  1. #include    "Devices.h"
  2. #include    "Events.h"
  3. #include    "Files.h"
  4.  
  5. #include    <Stdio.h>
  6.  
  7. #define    False    0
  8. #define    True    1
  9. #define    Null    0
  10.  
  11. void Stop()={0xa9ff};
  12.  
  13.  
  14. void    main (void)
  15. {
  16.     OSErr            Result;
  17.     ParamBlockRec    Pb;
  18.     short            Drive_Number;
  19.     short            RefNum;
  20.     DrvQElPtr        Q_Element;
  21.  
  22.     Pb.ioParam.ioCompletion    = 0;
  23.     Pb.ioParam.ioNamePtr    = "\p.NuDriver";
  24.     Pb.ioParam.ioVRefNum    = 0;
  25.     Pb.ioParam.ioBuffer        = Null;
  26.  
  27.     Result                    = PBOpen (&Pb, false);
  28.  
  29.     printf("Result is:    %lx\n", Result);
  30.     
  31. /////////////////////
  32. // If a Disk Driver,...
  33. //
  34. //    RefNum                    = Pb.ioParam.ioRefNum;
  35. //    Drive_Number            = Pb.ioParam.ioVRefNum;
  36. //    Q_Element                = (DrvQElPtr)Pb.ioParam.ioBuffer;
  37. //
  38. //    if ((Result == noErr) && (Q_Element != Null))
  39. //    {
  40. //        AddDrive (RefNum, Drive_Number, Q_Element);
  41. //        PostEvent (diskEvt, Drive_Number);
  42. //    }
  43. }
  44.